package com.lcgroup.springdemo.demos.service.impl;

import com.lcgroup.springdemo.demos.bean.ZSException;
import com.lcgroup.springdemo.demos.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TestServiceImpl implements TestService {
    @Override
    public String throwException(Integer fm) {
        int i;
        try {
            i = 1 / fm;
        } catch (Exception e) {
            throw new ZSException(String.format("发生异常，fm:%s",fm.toString()));
        }
        return String.valueOf(i);
    }
}
